<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="java.text.SimpleDateFormat"%>
<%@page language="java" import="java.util.Date" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>

	<!-- 在jsp里面可以写java代码  语法  小于号%    大于号% -->
	
	<% 
		System.out.print("10086");	
	
		//1 创建1个javax.servlet.http.Cookie类的对象
		//Cookie cookie = new Cookie("school","szrt");
		
		//2 调用response的addCookie方法将cookie发送给浏览器
		//response.addCookie(cookie);
		
		Date date = new Date();
		SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss:SSS");
		String date02 =sdf.format(date);
		Cookie cookie = new Cookie("school","szrt"+date02);
		response.addCookie(cookie);
		
	%>
</body>
</html>